<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
<body>
<script>
$(document).ready(function(){
	$("#selectType").val("${selectType}");
	$("#moneyType").val("${moneyType}");
});
</script>
<jsp:include page="../_log_head.jsp"></jsp:include>
<form class="form-inline" action="" method="get">从
  <div class="datepicker input-append">
    <input data-format="yyyy-MM-dd" type="text" value="${beginDate}" name="beginDate"></input>
    <span class="add-on">
      <i data-time-icon="icon-time" data-date-icon="icon-calendar">
      </i>
    </span>
  </div>
  到
  <div class="datepicker input-append">
    <input data-format="yyyy-MM-dd" type="text" value="${endDate}" name="endDate"></input>
    <span class="add-on">
      <i data-time-icon="icon-time" data-date-icon="icon-calendar">
      </i>
    </span>
  </div>&nbsp;&nbsp;
  
  类型选择：     <select name="selectType" id="selectType">
  		<c:forEach var="act" items="${actions}">
			<option value="${act.key}">${act.value}</option>
  		</c:forEach>
		</select>&nbsp;&nbsp;
		
金钱类型： 
		<select name="moneyType" id="moneyType">
			<option value="1">K币</option>
			<option value="2">分贝</option>
		</select>&nbsp;&nbsp;
		
  <input type="hidden" name="playerId" value="${playerId}" />
  <button type="submit" class="btn">查询</button>
</form>
<table class="table table-bordered">
  <caption>金钱日志</caption>
  <thead>
    <tr>
      <th>时间</th>
      <th>用户</th>
      <th>类型</th>
      <th>K币</th>
      <th>收入</th>
      <th>支出</th>
      <th>分贝</th>
      <th>收入</th>
      <th>支出</th>
      <th>备注</th>
    </tr>
  </thead>
  <tbody>
  <c:forEach var="money" items="${list}">
    <tr>
      <td>${money.at_time}</td>
      <td><tags:user id="${money.playerid}"/></td>
      <td><tags:money type="${money.action_type}" /></td>
      <td>${money.gold_current}</td>	
      <td><c:if test="${money.gold_orient==1}">${money.gold_delta}</c:if></td>
      <td><c:if test="${money.gold_orient==2}">${money.gold_delta}</c:if></td>
      <td>${money.silver_current}</td>
      <td><c:if test="${money.silver_orient==1}">${money.silver_delta}</c:if></td>
      <td><c:if test="${money.silver_orient==2}">${money.silver_delta}</c:if></td>
      <td>${money.remarks}</td>
    </tr>
  </c:forEach>
  </tbody>
</table>
<tags:page1 page="${page}" pageSize="${pageSize }" total="${total }" url="?playerId=${playerId}&beginDate=${beginDate }&endDate=${endDate}&selectType=${selectType }&page="/>
</body>
</html>